<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>订单</title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <link rel="stylesheet" type="text/css" href="$!webPath/resources/app/mcjd/css/common_jmc.css"/>
    <link rel="stylesheet" type="text/css" href="$!webPath/resources/app/mcjd/css/jmc_icon.css"/>
    <link rel="stylesheet" type="text/css" href="$!webPath/resources/app/mcjd/css/jmc_ufm.css"/>
    <script type="text/javascript" src="$!webPath/resources/app/mcjd/js/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="$!webPath/resources/app/mcjd/js/template.js"></script>
    <!--script type="text/javascript" src="$!webPath/resources/app/mcjd/js/combase.js"></script-->
    <script type="text/javascript">
    var __shareTitle = '【一家】社区包邮购，买啥都包邮';
    var __sharePicture = '$!webPath/resources/app/orgShipfree/images/logo.png';
    var __shareContent = '就这么任性~';
    var __shareUrl = window.location.href;
    window._URI_ = {
        IP0: '$!mallBaseurl', // 本地
        IP1: 'http://testmall.yijiahn.com/mall' // 开发环境
    }
    window._URL_ = {
        orderSettlement: _URI_.IP0 + '/app/order/settlement.json', //结算
        orderSubmits: _URI_.IP0 + '/app/order/submits.json', //购物车付款
        addressList: _URI_.IP0 + '/app/mcjd/addressList.htm', //地址列表
        buynow: _URI_.IP0 + '/app/goods/buynow.json', //立即购买
        myorder: _URI_.IP0 + '/app/mcjd/myorder.htm', //订单列表
        goodsDetail: _URI_.IP0 + '/app/goods/details.htm', //商品详情页
        gdCart: _URI_.IP0 + '/app/mcjd/gdCart.htm' //购物车列表
    };
    </script>
	<style>
		.ft-fixed-order .btn-pay{
			background:#B4282D;
			width:43%;
		}
		.ft-fixed-order{
			justify-content:space-between;
			    height: 50px;
				line-height: 50px;
		}
		.order-duser .it-info .it-tt .it_ico_24:before {
			width: 26px;
			height: 16px;
			line-height:16px;
			text-align:center;
			content:"默认";
			background-image: none;
			vertical-align: 0px;
			font-size:12px;
			border:1px solid #DA4E4F;
			border-radius:2px;
			color:#DA4E4F;
		}
		.order-duser .it-info .it-tt .addressReceiverName{
			width:27%;
		}
		.order-duser .it-info .it-tt .it_ico_25:before{
			background-image:none;
			width:0;
			height:0;
		}
		.order-dgood .it-tp{
			height:40px;
			line-height:38px;
			color:#474747;
			background-color:#F9F9F9;
			padding:0 0 0 10px;
		}
		.order-dgood{
			margin-top:0;
		}
		.bx-vorder{
			padding-top:0;
		}
		.it_toptt{
			background:#FAFAFA;
			color:#464646;
		}
		.order-duser .it-info,.order-dgood .it-det .it-tt{
			color:#464646;
		}
		.it-tp:after {
			content: '';
			position: absolute;
			right: 10px;
			width: 7px;
			height: 12px;
			margin-top:7px;
			background: url(/mall/resources/app/mcjd/images/ico_9.png) center center no-repeat;
			background-size: 100% 100%;
		}
		.order-dgood .it-info{
			border-bottom:none;
			padding-bottom:20px;
		}
		.h_fp{
			padding:2px  20px 10px 10px;
			display: -webkit-flex; 
			display: flex;
			justify-content: space-between;
			border-bottom:1px solid #EFEFEF;
			font-size:14px;
			color:rgba(218,78,79,1);
			<!-- border-top:10px solid rgba(244,244,244,1); -->
		}
		.order-duser .it-info .it-tt{
			display: -webkit-flex; 
			display: flex;
			justify-content: flex-start;
		}
		<!-- .h_fp:after{ -->
			<!-- content: ''; -->
			<!-- position: absolute; -->
			<!-- right: 10px; -->
			<!-- width: 7px; -->
			<!-- height: 12px; -->
			<!-- margin-top:-12px; -->
			<!-- background: url(/mall/resources/app/mcjd/images/ico_9.png) center center no-repeat; -->
			<!-- background-size: 100% 100%; -->
		<!-- } -->
		.h_fp .invoice{
			display:inline-block;
			padding-right:6px;
			color:rgba(143,143,143,1);
		}
		.discount{
			font-size:14px;
			color:rgba(70,70,70,1);
			padding: 0 24px 0 10px;
			border-bottom:1px solid #EFEFEF;
		}
		.d_zj,.d_qg{
			line-height:30px;
			display: -webkit-flex; 
			display: flex;
			justify-content: space-between;
		}
		.d_title{
			line-height:30px;
		}
		.d_price{
			color:rgba(218,78,79,1);
		}
		.order-dgood .it-tp1{
			position: relative;
			padding: 0 24px 0 10px;
			font-size: 12px;
			line-height: 60px;
			color: #333;
			border-bottom: 1px solid #e5e5e5;
		}
		.order-dgood .it-tp1{
			font-size:14px;
		}
		.orge{
			padding:0 10px;
			padding-top:10px;
			background:rgba(255,248,216,1);
			height:60px;
			font-size:13px;
			color:rgba(70,70,70,1);
		}
		.orge div{
			line-height:26px;
			color:rgba(70,70,70,1);
		}
		.orge_inner{
			color:#F7AB4B;
		}
		.addressDetail{
			overflow:hidden;
			text-overflow:ellipsis;
			white-space:nowrap;
			width:90%;
		}
		.order-duser .it-info{
			width:100%;
		}
		.all{
			display:flex;
			display:-webkit-flex;
			justify-content:space-between;
			color:rgba(70,70,70,1);
			padding: 10px 20px 10px 10px;
			border-top: 10px solid rgba(244,244,244,1);
		}
		.order-rmk input{
			color:rgba(70,70,70,1);
			text-align:left;
			font-size:14px;
		}
		.w_fp .select{
			margin-right:8px;
			display:block;
			width: 18px;
			height: 18px;
			background: url(/mall/resources/app/mcjd/images/icon_no.png) center center no-repeat;
			background-size: 100% 100%;
		}
		.w_fp{
			padding-left:10px;
			display:flex;
			display:-webkit-flex;
			height:35px;
			font-size:14px;
			color:rgba(143,143,143,1);
			align-items:center;
		}
		.order_select{
			font-size:14px;
		}
		.order-rmk{
			display:flex;
			display:-webkit-flex;
			align-items:center;
			border-bottom:1px solid #EFEFEF;
		}
		.order_right{
			margin-left:0px;
			flex-grow:1;
		}
		.order-rmk .active{
			background: url(/mall/resources/app/mcjd/images/ico_21.png) center center no-repeat;
			background-size: 100% 100%;
		}
		.tips{
			font-size:12px;
			color:#f20;
			padding:6px 16px;
		}
		.t_rmk{
			border:none;
		}
		.dialog,.dialog2{
			display:none;
            position: fixed;
            top: 0;
            left:0;
            width:100%;
            height:100%;
            background:rgba(0,0,0,0.4);
			z-index:100;
        }
        .dialog_out,.dialog_out2{
            text-align: center;
            width:80%;
            margin:auto;
            position: absolute;
            top:0;
            left:0;
            bottom:0;
            right:0;
            background: white;
            border-radius: 6px;
            height:140px;
        }
		.dialog_sure{
			font-size: 16px;
			color: rgba(70,70,70,1);
			line-height: 80px;
		}
		.dialog_sure2 {
			font-size: 16px;
			color: rgba(70,70,70,1);
			padding:20px;
		}
		.butt,.butt2 {
			display: flex;
			display: -webkit-flex;
			text-align: center;
			justify-content: space-between;
			align-items: center;
		}
		.butt .goon ,.butt2 .goon2{
			border-right: 1px solid rgba(151,151,151,0.6);
		}
		.butt div,.butt2 div {
			box-sizing: border-box;
			border-top: 1px solid rgba(151,151,151,0.6);
			width: 50%;
			line-height: 60px;
		}
		.wp_topbar{
			z-index:20;
		}
		.sure {
			color: rgba(182,38,40,1);
		}
		.ft-fixed-order{
			z-index:20;
		}
	</style>
</head>
<body style="background:#fafafa;">
	<div class="dialog">
        <div class="dialog_out">
            <div class="dialog_sure">确认要离开</div>
            <div class="butt">
                <div class="goon">我再想想</div>
                <div class="sure">去意已决</div>
            </div>
        </div>
    </div>
	<div class="dialog2">
        <div class="dialog_out2">
            <div class="dialog_sure2">您在浏览商品过程中选择了新的地址，是否新建一个收货地址</div>
            <div class="butt2">
                <div class="goon2">取消</div>
                <div class="sure2">去新建</div>
            </div>
        </div>
    </div>
	
	
    <div id="bxTopbar">
        <div class="bx_topbar">
            <div class="h_44"></div>
            <div class="wp_topbar">
                <div class="it_btn it_back_btn"><i class="icon ico_1"></i></div>
                <a class="it_btn it_sure_btn" href="javascript:;" style="visibility:hidden;">确定</a>
                <div class="it_toptt">填写订单</div>
            </div>
        </div>
    </div>
    
    <div class="bx-vorder">
        <div class="wp-vorder">
            <div class="order-duser">
                <div class="it-info">
                    <div class="it-tt clearfix">
                        <span class="fl it_ico_24 addressReceiverName"></span>
                        <span class="fr it_ico_25 addressMobile"></span>
                    </div>
                    <div class="it-addr addressDetail">暂没录入地址</div>
                </div>
            </div>
			<img src="/mall/resources/app/mcjd/images/line.png">
			<!-- 暂时隐藏身份证信息 -->
            <!-- <div class="order-idcard"> -->
                <!-- <div class="it-tip">*请确定身份证信息与收件人信息一致</div> -->
                <!-- <ul class="ul_0"> -->
                    <!-- <li class="li_0 li_0_t"> -->
                        <!-- <input type="text" placeholder="请输入身份证号码" id="addressCardNum"/> -->
                    <!-- </li> -->
                <!-- </ul> -->
            <!-- </div> -->
            <!-- 模板tmplGoodsCart -->
            
        </div>
    </div>
    
    <script type="text/html" id="tmplGoodsCart">
	{{each storeCartList as item ind}}
			<div class="order-dgood" it_storeCartId="{{item.storeCartId}}" it_goodsCartIds="{{goodsCartIds(item)}}">
                <!-- <div class="it-tp"><a href="javascript:;">{{item.store.storeName}}</a></div>  -->
                {{each item.goodsCartList as itemGC ind}}
                <div class="it-info clearfix">
                    <div class="it-img"><img src="{{itemGC.goods.mainPhoto.smallPicUrl}}" /></div>
                    <div class="it-det">
                        <div class="it-tt">{{itemGC.goods.name}}</div>
                        <div class="it-des">{{itemGC.goodsSpecInfo}}</div>
                        <div class="it-price clearfix">
                            <span class="fl it_pxj">￥{{itemGC.goodsPrice}}</span>
                            <!-- <span class="fl it_pyj">{{itemGC.goods.priceShow}}</span> -->
                            <span class="fr it_pn">x{{itemGC.goodsCount}}</span>
                        </div>
                    </div>
                </div>
                {{/each}}
				<div class="all">
					<span>商品合计</span>
					<span>￥<span class="totall"></span></span>
				</div>
				<div class="it-tp1 clearfix">
                    <span class="fl">运费：</span><span class="fr" style="font-size:14px;">¥{{item.transfee}}</span>
                </div>
				<!-- 先隐藏发票 -->
				<div class="w_fp">
					<span class="select"></span>
					<span>我要开发票</span>
				</div>
				<a class="h_fp" href="javascript:;">
					<span>如有发票需求，请联系客服：400-892-9222</span>
					<!-- <span class="invoice">电子(单位)</span><br> -->
				</a>
				<!-- 发票结束 -->
			<div class="order-rmk">
				<div class="order_select" id="aa" onclick="select(this)">
					备注：
				</div>
                <div class="order_right">
                    <input class="t_rmk" type="textarea" placeholder="选填：对本次交易的说明" id="remark_{{item.storeCartId}}">
                </div>
            </div>
    {{/each}}
    </script>
    <script type="text/javascript">
        template.helper("goodsCartIds", function(val){
            var gcList = val.goodsCartList;
            var gcIds = "";
            for(var i = 0; i < gcList.length; i++){
                if(gcIds == ""){
                    gcIds = gcList[i].goodsCartId;
                }else{
                    gcIds = gcIds + "," + gcList[i].goodsCartId;
                }
            }
            return gcIds;
        });
    </script>

    <div>
        <div class="h_56"></div>
        <div class="ft-fixed-order">
            <!-- <span class="it-other"></span> -->
            <span class="it-price">合计：<b><i>¥</i><var id="goodsAmountTotalAll">68.00</var></b></span>
            <span class="btn-pay">结算</span>
        </div>
    </div>
    <script type="text/javascript" src="$!webPath/resources/app/mcjd/js/touch.min.js"></script>
    <script type="text/javascript" src="$!webPath/resources/app/mcjd/js/imgSetSize.min.js"></script>
    <script type="text/javascript" src="$!webPath/resources/app/mcjd/js/utils.js"></script>
    <script type="text/javascript">
        var __isApp_, __srcApp_, __appversion_, __url_, __isWeixin_ = Utils.isWeixin();
        var _accessToken = "$!accessToken",_orgId="$!orgId",_goodsCartIds="$!goodsCartIds",_addressId="$!addressId";
        var _isBuynow = "$!isBuynow",_buyParams="$!buyParams",_goodsId="$!goodsId";
        var _token = "$!token";
        Utils.lsRemove("_isApp");
        var _isIos = Utils.isiOs();
        var _isApp = Utils.isApp(__isApp_);
		<!-- 获取地址栏信息 -->
		function GetQueryString(name)
		{
			 var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
			 var r = decodeURI(window.location.search.substr(1)).match(reg);
			 if(r!=null)return  unescape(r[2]); return null;
		}
        
        jQuery(function($) {
			$(".goon").click(function() {
				$(".dialog").hide();
			})
			$(".goon2").click(function() {
				$(".dialog2").hide();
			})
		
            function settlementCarts() {
                $.ajax({
                    type: "POST",
                    dataType: "json",
                    timeout: 15000,
                    url: _URL_.orderSettlement,
                    data: {
                        accessToken: _accessToken,
                        orgId: _orgId,
                        goodsCartIds: _goodsCartIds,
                        addressId: _addressId
                    },
                    success: function(res) {
                        if ("100" === res.code) {
                            if(res.data && res.data.storeCartList){
                                parseData(res.data);
								var addr2=GetQueryString("addres");
								var addr1=$(".addressDetail").html();
								$(".sure2").on("click",function() {
									if(addr2!=addr1){
										if(_isBuynow == "1"){
											location.href = _URL_.addressList +"?accessToken="+_accessToken+"&orgId="+_orgId +"&goodsId="+_goodsId+"&buyParams="+_buyParams +"&addressId="+_addressId +"&isBuynow="+_isBuynow;
										}else{
											location.href = _URL_.addressList +"?accessToken="+_accessToken+"&orgId="+_orgId +"&goodsCartIds="+_goodsCartIds +"&addressId="+_addressId;
										}
									}
								})
                            }else{
                                Utils.showToast("结算失败，请取消重试！");
                            }
                        } else if ("401" === res.code) { //App端请求，需要登录
                            Utils.showToast("请登录后再操作！");
                        } else if ("405" === res.code) { //微信端请求，需要登录
                            Utils.showToast("请先微信授权后再操作！");
                        } else {
                            var errorhtml = template('tmplErrorData', {});
                            $('#resNoData').html(errorhtml);
                            console.log('请求出错: ' + _URL_.goodslist);
                            Utils.showToast(res.code + ":" + res.msg || '请求出错');
                        }
                    },
                    error: function(xhr) {
                        var errorhtml = template('tmplErrorData', {});
                        $('#resNoData').html(errorhtml);
                        console.log('请求出错: ' + _URL_.goodslist);
                        var msg = "请求出错(请检查相关网络状况)";
                        Utils.showToast(msg);
                    }
                });
            };
            function buynow() {
                $.ajax({
                    type: "POST",
                    dataType: "json",
                    timeout: 15000,
                    url: _URL_.buynow,
                    data: {
                        accessToken: _accessToken,
                        orgId: _orgId,
                        params: _buyParams,
                        addressId: _addressId
                    },
                    success: function(res) {
                        if ("100" === res.code) {
                            if(res.data && res.data.storeCartList){
                                parseData(res.data);
								var addr2=GetQueryString("addres");
								var addr1=$(".addressDetail").html();
								$(".sure2").on("click",function() {
									if(addr2!=addr1){
										if(_isBuynow == "1"){
											location.href = _URL_.addressList +"?accessToken="+_accessToken+"&orgId="+_orgId +"&goodsId="+_goodsId+"&buyParams="+_buyParams +"&addressId="+_addressId +"&isBuynow="+_isBuynow;
										}else{
											location.href = _URL_.addressList +"?accessToken="+_accessToken+"&orgId="+_orgId +"&goodsCartIds="+_goodsCartIds +"&addressId="+_addressId;
										}
									}
								})
                            }else{
                                Utils.showToast("立即购买失败，请取消重试！");
                            }
                        } else if ("401" === res.code) { //App端请求，需要登录
                            Utils.showToast("请登录后再操作！");
                        } else if ("405" === res.code) { //微信端请求，需要登录
                            Utils.showToast("请先微信授权后再操作！");
                        } else {
                            var errorhtml = template('tmplErrorData', {});
                            $('#resNoData').html(errorhtml);
                            console.log('请求出错: ' + _URL_.goodslist);
                            Utils.showToast(res.code + ":" + res.msg || '请求出错');
                        }
                    },
                    error: function(xhr) {
                        var errorhtml = template('tmplErrorData', {});
                        $('#resNoData').html(errorhtml);
                        console.log('请求出错: ' + _URL_.goodslist);
                        var msg = "请求出错(请检查相关网络状况)";
                        Utils.showToast(msg);
                    }
                });
            };
            function parseData(data){
                var html = template('tmplGoodsCart', data);
                $('.wp-vorder').append(html);
                
                var scList = data.storeCartList;
                var addressReceiverName = "";
                var addressMobile = "";
                var addressDetail = "";
                var addressCardNum = "";
                var goodsAmountTotalAll = 0;
                for(var i = 0; i < scList.length; i++){
                    if(i == 0 && scList[i].address){
                        var addressData = scList[i].address;
                        addressReceiverName = addressData.receiverName;
                        addressMobile = addressData.mobile;
                        if(addressData.provinceName){
                            addressDetail = addressData.provinceName;
                        }
                        if(addressData.cityName){
                            addressDetail = addressDetail + addressData.cityName;
                        }
                        if(addressData.countyName){
                            addressDetail = addressDetail + addressData.countyName;
                        }
                        if(addressData.streetName){
                            addressDetail = addressDetail + addressData.streetName;
                        }
                        if(addressData.detailAddress){
                            addressDetail = addressDetail + addressData.detailAddress;
                        }
                        if(addressData.card_num){
                            addressCardNum = addressData.card_num;
                        }
                        
                        _addressId = addressData.addressId;
                    }
                    goodsAmountTotalAll = scList[i].goodsAmountTotal + scList[i].transfee;
                }
                $(".addressReceiverName").html(addressReceiverName);
                $(".addressMobile").html(addressMobile);
                if(addressDetail != ""){
                    $(".addressDetail").html(addressDetail);
                }
                if(addressCardNum != ""){
                    $(".addressCardNum").html(addressCardNum);
                }
                $("#goodsAmountTotalAll").html(goodsAmountTotalAll);
				$(".totall").html(goodsAmountTotalAll);
            	
            }
            function startBuy(){
                if(_isBuynow == "1"){
					$(".dialog2").show();
                    buynow();
                }else{
					$(".dialog2").show();
                    settlementCarts();
                }
            }
            startBuy();
            
            
            //提交订单
            $('.btn-pay').on('click', function(){
                var storeCarts = $(".order-dgood");
                var _params = "{";
                for(var i = 0; i < storeCarts.length; i++){
                    if(i > 0){
                        _params = _params + ",";
                    }
                    var storeCart = storeCarts.eq(i);
                    var _storeCartId = storeCart.attr("it_storeCartId");
                    var _goodsCartIds = storeCart.attr("it_goodsCartIds");
                    var _remark = $("#remark_"+_storeCartId).val();
                    if(!_remark) _remark = "";
                    _params = _params + "\""+_storeCartId+"\":{\"goodsCartIds\":\"" + _goodsCartIds + "\",\"transType\":\"express\",\"addressId\":"+_addressId+",\"msg\":\""+_remark+"\"}";
                }
                _params = _params + "}";
                var _card_num = $("addressCardNum").val();
                if(!_card_num) _card_num = "";
                alert(_URL_.orderSubmits);
                $.ajax({
                    type: "POST",
                    dataType: "json",
                    timeout: 50000,
                    url: _URL_.orderSubmits,
                    <!-- url:"http://114.215.96.146:8081/mall/app/order/submits.json", -->
                    data: {
                        accessToken: _accessToken,
                        orgId: _orgId,
                        useJycoin: 0,
                        card_num: _card_num,
                        params: _params
                    },
                    success: function(res) {
					<!-- var orderNo=res.data.orderNo; -->
					<!-- var money=res.data.totalAmount; -->
					<!-- console.log(orderNo); -->
					<!-- console.log(money); -->
					<!-- //唤起收银台开始 -->
						<!-- $.ajax({ -->
							<!-- type: "GET", -->
							<!-- url: "http://192.168.19.76:8888/mall/app/order/pay.htm", -->
							<!-- dataType: "json", -->
							<!-- <!-- jsonp:"jsonpCallback", --> -->
							<!-- data:{ -->
								<!-- orderNo:orderNo, -->
								<!-- payAmount:money -->
							<!-- }, -->
							<!-- dataType: "jsonp", -->
							<!-- jsonp:"jsonpCallback", -->
							<!-- success: function(data){ -->
								<!-- alert("调起收银台成功"); -->
							<!-- }, -->
							<!-- error: function(XMLHttpRequest, textStatus, errorThrown) { -->
								<!-- alert("失败"); -->
								<!-- alert(XMLHttpRequest.status); -->
								<!-- alert(XMLHttpRequest.readyState); -->
								<!-- alert(textStatus); -->
							<!-- } -->
						<!-- }); -->
						
					<!-- //唤起收银台结束 -->
					console.log(res);
                        if ("100" === res.code) {
                            if(res.data){
                                Utils.showToast("提交订单成功");
                                setTimeout(function(){
                                    //Utils.showToast("支付流程");
                                    //            参数1：实际支付金额 order_am
                                    //            参数2：订单号 orderSn
                                    //            参数3：订单ID orderID
                                    //            参数4：满减金额 disAmt
                                    //            参数5：随机满减 randomSub
                                    var order_am = res.data.totalAmount;
                                    var orderSn = res.data.orderNo;
                                    var orderID = res.data.orderId;
                                    var disAmt = 0;
                                    var randomSub = 0;
                                    <!-- window.InterfaceOrder.submitOrderInfo(order_am, orderSn, orderID, disAmt, randomSub); -->
									window.location.href = "http://192.168.19.76:8888/mall/app/order/pay.htm?orderNo="+orderSn+ "&payAmount=" + order_am;;
								},1000)
                            }else{
                                Utils.showToast(res.msg);
                            }
                        } else if ("401" === res.code) { //App端请求，需要登录
                            Utils.showToast("请登录后再操作！");
                        } else if ("405" === res.code) { //微信端请求，需要登录
                            Utils.showToast("请先微信授权后再操作！");
                        } else {
                            var errorhtml = template('tmplErrorData', {});
                            $('#resNoData').html(errorhtml);
                            console.log('请求出错: ' + _URL_.goodslist);
                            Utils.showToast(res.code + ":" + res.msg || '请求出错');
                        }
                    },
                    error: function(xhr) {
                        var errorhtml = template('tmplErrorData', {});
                        $('#resNoData').html(errorhtml);
                        console.log('请求出错');
                        var msg = "请求出错(请检查相关网络状况)";
                        Utils.showToast(msg);
                    }
                });
            });
            
            // 选择地址(地址列表)
            $('.order-duser').on('click', function() {
                if(_isBuynow == "1"){
                    location.href = _URL_.addressList +"?accessToken="+_accessToken+"&orgId="+_orgId +"&goodsId="+_goodsId+"&buyParams="+_buyParams +"&addressId="+_addressId +"&isBuynow="+_isBuynow;
                }else{
                    location.href = _URL_.addressList +"?accessToken="+_accessToken+"&orgId="+_orgId +"&goodsCartIds="+_goodsCartIds +"&addressId="+_addressId;
                }
            });
            
            //返回上一页
            $('.it_back_btn').click(function(){
				$(".dialog").show();
            });
			$(".sure").click(function() {
				if(_isBuynow == "1"){
                    location.href = _URL_.goodsDetail + "?accessToken="+_accessToken+"&orgId="+_orgId +"&id="+_goodsId;
                }else{
                    location.href = _URL_.gdCart + "?accessToken="+_accessToken+"&orgId="+_orgId;
                }
			})
        });
    </script>
	<script>
	function select(data) {
		if($(data).hasClass("active")){
			$(data).removeClass("active");
		}else{
			$(data).addClass("active");
		}
	}
</script>
</body>
</html>